#{meta /}

#{body}

<div class="container">
	<form class="row" method="GET" action="/search">
		<div class="col-lg-12">
			<h1 class="text-center" id="logo">Japanese Vocabulary</h1>
		</div>
		<div class="col-lg-12">
			<input type="text" class="form-control jp-input-search" name="q" value="${request.params.get('q')}" id="input-text">
		</div>
		<div class="col-lg-12 text-center">
			<button class="btn btn-default" id="btn-search" type="submit">搜索</button>
		</div>
	</form>
	<div class="row main">
		<div class="col-lg-12">
			<div class="div-characters">
				#{list items:characters, as:'character'}
					<div class="div-character">
						<div>
							<a href="${character.href}">
								<span class="character-jp">${character.jp}</span>
								<span class="character-cn">
									#{list items:character.cns, as:'cn'}
										${cn}
									#{/list}
								</span>
							</a>
						</div>
						<div class="div-character-pinyins">
							#{list items:character.pinyins, as:'pinyin'}
								<span class="font-bold">${pinyin}</span>
							#{/list}
						</div>
						<div class="div-character-syllables">
							#{list items:character.syllables, as:'syllable'}
								<div>
									<div class="character-syllable">${syllable.value}</div>
									<div class="div-character-words">
										#{list items: syllable.words, as:'word'}
											<div class="character-word">${word.word}(${word.syllable})</div>
										#{/list}
									</div>
								</div>
							#{/list}
						</div>
						<div class="div-character-fixwords">
							#{list items:character.fixwords, as:'fixword'}
								<div><span class="font-bold">${fixword.word}</span>(${fixword.syllable})</div>
							#{/list}
						</div>
					</div>
				#{/list}
			</div>
			<div>
				<table class="table table-bordered">
					#{list items:notionals, as:'word'}
						<tr>
							<th><a href="${word.href}">${word.value}</a></th>
							<td>
								#{list items:word.alias, as:'alias'}
									<div>${alias}</div>
								#{/list}
							</td>
							<td>
								#{list items:word.meanings, as:'meaning'}
									<div>${meaning}</div>
								#{/list}
							</td>
							<td>
								#{list items:word.types, as:'type'}
									<span>${type}</span>
								#{/list}
							</td>
						</tr>
					#{/list}
					#{list items:verbs, as:'word'}
						<tr>
							<th><a href="${word.href}">${word.value}</a></th>
							<td>
								#{list items:word.alias, as:'alias'}
									<div>${alias}</div>
								#{/list}
							</td>
							<td>
								#{list items:word.meanings, as:'meaning'}
									<div>${meaning}</div>
								#{/list}
								<table class="table-fixwords">
									#{list items:word.fixwords, as:'fixword'}
										<tr>
											<td>【${fixword.word}】</td>
											<td>${fixword.meaning}</td>
										</tr>
									#{/list}
								</table>
							</td>
							<td>
								#{list items:word.types, as:'type'}
									<span>${type}</span>
								#{/list}
							</td>
						</tr>
					#{/list}
					#{list items:adjs, as:'word'}
						<tr>
							<th><a href="${word.href}">${word.value}</a></th>
							<td>
								#{list items:word.alias, as:'alias'}
									<div>${alias}</div>
								#{/list}
							</td>
							<td>
								#{list items:word.meanings, as:'meaning'}
									<div>${meaning}</div>
								#{/list}
								<table class="table-fixwords">
									#{list items:word.fixwords, as:'fixword'}
										<tr>
											<td>【${fixword.word}】</td>
											<td>${fixword.meaning}</td>
										</tr>
									#{/list}
								</table>
							</td>
							<td>
								<span>形容词</span>
								#{list items:word.types, as:'type'}
									<span>${type}</span>
								#{/list}
							</td>
						</tr>
					#{/list}
					#{list items:katakanas, as:'word'}
						<tr>
							<th><a href="${word.href}">${word.value}</a></th>
							<td>【${word.context}】${word.alias}</td>
							<td>
								#{list items:word.meanings, as:'meaning'}
									<div>${meaning}</div>
								#{/list}
							</td>
							<td>
								#{list items:word.types, as:'type'}
									<span>${type}</span>
								#{/list}
							</td>
						</tr>
					#{/list}
				</table>
			</div>
			#{if !characters && !notionals && !verbs && !adjs && !katakanas}
				<p>（无）</p>
			#{/if}
		</div>
	</div>
</div>

#{/body}

#{stylesheet "words/query.css"/}
